package com.jgp.glmeeting.controller;

import com.jgp.glmeeting.model.Arrangement;
import com.jgp.glmeeting.service.ArrangementService;
import com.jgp.sys.common.controller.JGPController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/glMeeting/arrangementController")
public class ArrangementController extends JGPController {


    @Autowired
    private ArrangementService arrangementService;

    /**
     *   跳转到listArrangement页面
     */

    @RequestMapping("/listArrangement")
    public String listManager(){
        return page("listArrangement");
    }

    /**
     *    跳转到addArrangement页面
     */

    @RequestMapping("/addArrangement")
    public String addManager(){
        return page("addArrangement");
    }


    /**
     *    跳转到editArrangement页面  进行页面编辑
     */

    @RequestMapping("/editArrangement/{id}")
    public String editManager(@PathVariable String id, Model model){
        Arrangement a=arrangementService.queryID(id);
        re(model,"editArrangement",a);
        return page("editArrangement");
    }
}
